import React, { useState } from 'react'
import Styles from '../assets/styles/login.module.less'
import ComLogin from '../components/Login/ComLogin';
import ComSettle from '../components/Login/ComSettle';
type Props = {

}

const Login = (props: Props) => {
    const [IsCom, setIsCom] = useState(true)
    const getIsCom = (val: boolean) => {
        console.log(val);
        setIsCom(val)
    }
    return (
        <div className={Styles.content}>
            <div className={Styles.bigbox}>
                {/* logo */}
                <div className={Styles.header}>
                    <div>
                        <img src='http://xawn.f3322.net:8002/distremote/static/img/logo.png' alt="" className={Styles.logoImg} />
                    </div>
                    <div className={Styles.title}>赤兔养车</div>
                </div>
                {/* form表单 */}
                {
                    IsCom ? <ComLogin getIsCom={getIsCom}></ComLogin> : <ComSettle getIsCom={getIsCom}></ComSettle>
                }
            </div>
        </div>
    )
}
export default Login

